package main;


/**
 * Thread to update the line numbers in the line numbers side panel in the MainWindow class,to update the currentText variable of the text area, and to hightlight the current line
 * @author Balazs Pete
 *
 */
public class LineNumberUpdater extends Thread {
	private int lineCount;
	public LineNumberUpdater(int lineCount){
		super();
		this.lineCount = lineCount;
	}
	
	/**
	 * Method to run thread
	 */
	public void run(){
		main.MainWindow.numbersPane.updateNumbers(lineCount);
		main.MainWindow.updateText();
		
		try {
			//to dispose of the thread
			this.finalize();
		} catch (Throwable e) {
			e.printStackTrace();
		}
	}
	
}
